def hello(name):
    print("hello, %s" % name)

hello("zhangsan")


def printinfo(name, age):
    "打印任何传入的字符串"
    print("名字: ", name)
    print("年龄: ", age)
    return


# 调用printinfo函数
printinfo(50, "runoob")

# 默认值
# 可写函数说明
def printinfo(name, age=35):
    print("名字: ", name)
    print("年龄: ", age)
    return


# 调用printinfo函数
printinfo(age=50, name="runoob")
print("------------------------")
printinfo(name="runoob")


# 可变参数
printinfo(age=50, name="runoob")
print("------------------------")
printinfo(name="runoob")

# * 代表元組，** 代表字典
def fn(a, b, *args,     d=7, e=8, **kwargs):
    print(a, b, args)  # 2 3 (4, 5)
    print(d, e, kwargs)  # 77 88 {'f': 99, 'g': 100}

fn(2, 3, 4, 'a',    d=77, e=88, f=99, g=100)